package kr.saeildamil.androidstudy.ch07;

import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Bundle;
import android.view.View;

public class PrePaint extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	}
	
	class MyView extends View{
		Paint mpnt;
		public MyView(Context context){
			super(context);
			mpnt = new Paint();
			mpnt.setAntiAlias(true);
			mpnt.setColor(Color.BLUE);
			mpnt.setStrokeWidth(10);
			mpnt.setStyle(Paint.Style.STROKE);
			mpnt.setStrokeJoin(Paint.Join.BEVEL);
		}
		
		@Override
		protected void onDraw(Canvas canvas) {
			canvas.drawColor(Color.LTGRAY);
			canvas.drawRect(10, 10, 30, 100, mpnt);
		}
	}
}
